package com.yijiajiao.finance.mappers;

import com.yijiajiao.finance.bean.FinanceLog;
import com.yijiajiao.finance.bean.FinanceLogQuery;
import org.mybatis.spring.annotation.MapperScan;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


@MapperScan
public interface FinanceLogMapper {

    /**
     *@Desc 根据id查询单条记录
     *@Author zhaoming@eduspace
     *@Date 2017/5/10 13:52
     */
    FinanceLog queryById(int id);

    /**
     *@Desc 添加财务记录
     *@Author zhaoming@eduspace
     *@Date 2017/5/10 13:52
     */
    void saveFinanceLog(FinanceLog financeLog);

    /**
     *@Desc  通过openId查询个人财务记录
     *@Author zhaoming@eduspace
     *@Date 2017/5/10 13:54
     */
    List<FinanceLog> queryFinanceLogsByOpenId(String openId);

    /**
     *@Desc  通过条件查询财务记录，返回单条记录
     *@Author zhaoming@eduspace
     *@Date 2017/5/10 13:55
     */
    FinanceLog queryFinanceLogByConditions(FinanceLog financeLog);

    /**
     *@Desc  查询某个月教师收入
     *@Author zhaoming@eduspace
     *@Date 2017/5/10 13:51
     */
    BigDecimal queryAllTeacherIncomeByMonth(Map<String, Object> param);


    List<FinanceLog> queryTeacherTradeLogs(FinanceLogQuery flq);
}
